import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [

  {//平台管理员系统
    path: '/AdmSystem',
    component: () => import('../views/AdmSystem.vue'),
    children: [
      {
        path: 'CarList',
        component: () => import('../components/CarList.vue'),
      },
      {
        path: 'LessorList',
        component: () => import('../components/lessor/LessorList.vue'),
      },
      {
        path: 'RentalList',
        component: () => import('../components/rental/RentalList.vue'),
      },
      {
        path: 'AdminList',
        component: () => import('../components/admin/AdminList.vue'),
      },
      {
        path: 'AddAdmin',
        component: () => import('../components/admin/AddAdmin.vue'),
      },
      {
        path: 'MyCenter',
        component: () => import('../components/myCenyer/MyCenter.vue'),
      },
    ]
  },
  {
    path:'/Login',
    component:()=>import('../views/Login.vue')
  },
  {
    path:'/Register',
    component:()=>import('../views/Register.vue')
  },
  
]

const router = new VueRouter({
  routes
})

export default router
